

//
//  ZExportPrivateView.m
//  NewProject
//
//  Created by Apple on 2018/5/19.
//  Copyright © 2018年 chenIos. All rights reserved.
//

#import "ZExportPrivateView.h"

@implementation ZExportPrivateView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (IBAction)duplicatePrivateAction:(UIButton *)sender {
    UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
    pasteboard.string = self.privateLabel.text;
    ZWLog(@" privateKey = %@",self.privateLabel.text);
    [ZProgressManager showSuccess:Z_Location(@"copySuccess")];
    [self removeFromSuperview];
}
+ (ZExportPrivateView *)exportView
{
    NSArray *arr = [[NSBundle mainBundle] loadNibNamed:@"ZExportPrivateView" owner:self options:nil];
    return [arr firstObject];
}
- (void)awakeFromNib
{
    [super awakeFromNib];
    [self initUI];
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super initWithCoder:aDecoder]) {
       
        
    }return self;
}

- (void)initUI{
    self.backView.layer.cornerRadius = 5;
    self.backView.clipsToBounds = YES;
    self.backgroundColor = RGBACOLOR(0, 0, 0, 0.6);
    self.warningBackView.layer.borderColor = [UIColor colorWithHexString:@"#f55b67"].CGColor;
    self.warningBackView.layer.borderWidth = 1;
    self.warningBackView.layer.cornerRadius = 5;
    self.warningBackView.clipsToBounds = YES;
    self.warningLabel.textColor = [UIColor colorWithHexString:@"#cb1818"];
    self.warningLabel.font = H_Medium6;
    self.warningBackView.backgroundColor = [UIColor colorWithHexString:@"#faf0ee"];
    self.warningLabel.text = Z_Location(@"exportPrivateKeyWarn");
    self.privateLabel.textColor = [UIColor blackColor];
    self.privateLabel.font = H_Medium6;
    self.privateBackView.backgroundColor = [UIColor colorWithHexString:@"#eff3f6"];
    [self.duplicateBtn setBackgroundColor:[UIColor colorWithHexString:@"#37b9c9"]];
    [self.duplicateBtn setTitle:Z_Location(@"copy") forState:UIControlStateNormal];
    self.duplicateBtn.layer.cornerRadius = 5;
    self.duplicateBtn.clipsToBounds = YES;
    [self.duplicateBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.duplicateBtn.titleLabel.font = H_Medium2;
    self.exportTitleLabel.text = Z_Location(@"exportPrivateKey");
    
    self.exportTitleLabel.textColor = [UIColor blackColor];
    self.exportTitleLabel.font = H1;
}
@end
